package com.android.tea;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

import com.android.tea.util.TeaLog;
import com.android.tea.widght.SettingItemButton;
import com.android.tea.widght.SettingItemPanel;

public class PersonalCardActivity extends Activity implements OnClickListener {

	LinearLayout personocard_panel;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.personalcard);
		personocard_panel = (LinearLayout) findViewById(R.id.personocard_panel);
		init();
	}

	private void init() {
		SettingItemPanel sip = new SettingItemPanel(this);
		SettingItemButton sib = new SettingItemButton(this);
		sib.setItemOnClickListener(this);
		sib.setTitle("性别");
		sib.setMessage("女");
		sip.addItem(sib);
		SettingItemButton sib1 = new SettingItemButton(this);
		sib1.setTitle("地区");
		sib1.setMessage("北京 东城");
		sip.addItem(sib1);
		sib1.setItemOnClickListener(this);

		SettingItemButton sib2 = new SettingItemButton(this);
		sib2.setTitle("帐号");
		sib2.setMessage("lucylucky");
		sib2.setItemOnClickListener(this);
		sip.addItem(sib2);

		SettingItemButton sib3 = new SettingItemButton(this);
		sib3.setTitle("手机号");
		sib3.setMessage("18600000000");
		sib3.setItemOnClickListener(this);
		sip.addItem(sib3);

		SettingItemButton sib4 = new SettingItemButton(this);
		sib4.setTitle("邮箱");
		sib4.setMessage("sunny26@sina.com");
		sib4.setItemOnClickListener(this);
		sip.addItem(sib4);

		SettingItemButton sib5 = new SettingItemButton(this);
		sib5.setTitle("个性签名");
		sib5.setMessage("人生最悲惨的事情是青春没了.而青春痘还在.");
		sib5.setItemOnClickListener(this);
		sip.addItem(sib5);

		personocard_panel.addView(sip);
	}

	@Override
	public void onClick(View arg0) {
		RelativeLayout rlLayout = (RelativeLayout) arg0;
		TeaLog.e(" onClick", " rlLayout ");

	}
}
